Skip to content

Conversation

@a-r-r-o-w
Copy link
Contributor

dtype is set to torch.float32 when prepare_latents is called. This works if the VAE is loaded in torch.float32 (as done in the docstring). But, loading the VAE in any other dtype fails with a dtype mismatch error.

@a-r-r-o-w a-r-r-o-w requested review from Copilot and yiyixuxu April 20, 2025 20:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a dtype mismatch error in the prepare_latents function by updating how the input tensor is converted to the VAE’s dtype. Key changes include updating video_condition conversion to use self.vae.dtype and adding an explicit conversion for latent_condition.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@yiyixuxu yiyixuxu merged commit e7f3a73 into main Apr 21, 2025
15 checks passed
@yiyixuxu yiyixuxu deleted the fix-wan-i2v-dtype branch April 21, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants